import { createRouter, createWebHashHistory } from 'vue-router'
import Index from "../components/layout/index.vue";
const routes = [
    {
        path: '/',
        name: 'index',
        component: Index,
        // redirect: 'main',
        //路由嵌套
        children: [
            { path: '/index/main', name: 'main', component: () => import('../components/main/index.vue') },
            { path: '/index/mapIndex', name: 'mapIndex', component: () => import('../components/mapIndex/index.vue') },
            { path: '/index/mapView', name: 'mapView', component: () => import('../components/mapView/index.vue') },
            { path: '/index/mapModel-3dTiles', name: 'mapModel-3dTiles', component: () => import('../components/mapModel/index-3dTiles.vue') },
            { path: '/index/mapModel-gltf', name: 'mapModel-gltf', component: () => import('../components/mapModel/index-gltf.vue') },
            { path: '/index/mapModel-geojson', name: 'mapModel-geojson', component: () => import('../components/mapModel/index-geojson.vue') },
            { path: '/index/mapEffect-heatmap1', name: 'mapEffect-heatmap1', component: () => import('../components/mapEffect/index-heatmap1.vue') },
            { path: '/index/mapEffect-heatmap2', name: 'mapEffect-heatmap2', component: () => import('../components/mapEffect/index-heatmap2.vue') },
            { path: '/index/mapEffect-water', name: 'mapEffect-water', component: () => import('../components/mapEffect/index-water.vue') }
        ]
    }]

// 创建路由实例
const router = createRouter({
    history: createWebHashHistory(),
    routes //路由表
})

export default router